<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta content="text/javascript" http-equiv="content-script-type">
<title>tango.util.collection.model.Map</title>

<link rel="stylesheet" type="text/css" href="css/style.css">
<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="css/ie56hack.css"><![endif]-->
<script language="JavaScript" src="js/util.js" type="text/javascript"></script>
<script language="JavaScript" src="js/tree.js" type="text/javascript"></script>
<script language="JavaScript" src="js/explorer.js" type="text/javascript"></script>
<script>
function anchorFromTitle(title, path, ext) {
  var url = path + title + "." + ext;
  document.write("<a href='" + url + "'>" + title + "</a>");
  }
</script>
</head><body>
<div id="tabarea"></div><div id="explorerclient"></div>
<div id="content"><script>explorer.initialize("tango.util.collection.model.Map");</script>
        <table class="content">
                <tr><td id="docbody"><h1><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/model/Map.d?rev=3461">tango.util.collection.model.Map</a></h1>
                
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>interface <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/model/Map.d?rev=3461#L34">Map</a></span>
<script>explorer.outline.addDecl('Map');</script>(K, T) : MapView!(K, T), Dispenser!(T);</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">MutableMap supports standard update operations on maps.</font><br><br>
<b>author:</b><br>Doug Lea
 @version 0.93<br><br> <P> For an introduction to this package see <A HREF="index.html"> Overview </A>.<br><br>
<dl>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/model/Map.d?rev=3461#L52">add</a></span>
<script>explorer.outline.addDecl('add');</script>(K <span class="funcparam">key</span>, T <span class="funcparam">element</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Include the indicated pair in the Map
 If a different pair
 with the same key was previously held, it is replaced by the
 new pair.</font><br><br>
<font color="black">@param key the key for element to include
 @param element the element to include
 </font><br><br>
<b>Returns:</b><br>
<br><br>
<b>condition:</b><br><PRE>
 has&#40;key, element&#41; &amp;&amp;
 no spurious effects &amp;&amp;
 Version change iff !PREV&#40;this&#41;.contains&#40;key, element&#41;&#41;
 </PRE><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/model/Map.d?rev=3461#L70">opIndexAssign</a></span>
<script>explorer.outline.addDecl('opIndexAssign');</script>(T <span class="funcparam">element</span>, K <span class="funcparam">key</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Include the indicated pair in the Map
 If a different pair
 with the same key was previously held, it is replaced by the
 new pair.</font><br><br>
<font color="black">@param element the element to include
 @param key the key for element to include
 </font><br><br>
<b>Returns:</b><br>
<br><br>
<b>condition:</b><br><PRE>
 has&#40;key, element&#41; &amp;&amp;
 no spurious effects &amp;&amp;
 Version change iff !PREV&#40;this&#41;.contains&#40;key, element&#41;&#41;
 </PRE><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/model/Map.d?rev=3461#L86">removeKey</a></span>
<script>explorer.outline.addDecl('removeKey');</script>(K <span class="funcparam">key</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Remove the pair with the given key
 @param  key the key
 </font><br><br>
<b>Returns:</b><br>
<br><br>
<b>condition:</b><br><PRE>
 !containsKey&#40;key&#41;
 foreach &#40;k in keys&#40;&#41;&#41; at&#40;k&#41;.equals&#40;PREV&#40;this&#41;.at&#40;k&#41;&#41; &amp;&amp;
 foreach &#40;k in PREV&#40;this&#41;.keys&#40;&#41;&#41; &#40;!k.equals&#40;key&#41;&#41; --&gt; at&#40;k&#41;.equals&#40;PREV&#40;this&#41;.at&#40;k&#41;&#41; 
 &#40;version&#40;&#41; != PREV&#40;this&#41;.version&#40;&#41;&#41; == 
 containsKey&#40;key&#41; !=  PREV&#40;this&#41;.containsKey&#40;key&#41;&#41;
 </PRE><br><br></dd>
<script>explorer.outline.writeEnabled = true;</script>
<dt><span class="decl"><li>void <span class="currsymbol"><a href="http://www.dsource.org/projects/tango/browser/trunk/tango/util/collection/model/Map.d?rev=3461#L104">replacePair</a></span>
<script>explorer.outline.addDecl('replacePair');</script>(K <span class="funcparam">key</span>, T <span class="funcparam">oldElement</span>, T <span class="funcparam">newElement</span>); [public]</li></span></dt>
<script>explorer.outline.writeEnabled = false;</script>
<dd>
<font color="black">Replace old pair with new pair with same key.
 No effect if pair not held. &#40;This has the case of
 having no effect if the key exists but is bound to a different value.&#41;
 @param key the key for the pair to remove
 @param oldElement the existing element
 @param newElement the value to replace it with
 </font><br><br>
<b>Returns:</b><br>
<br><br>
<b>condition:</b><br><PRE>
 !contains&#40;key, oldElement&#41; || contains&#40;key, newElement&#41;;
 no spurious effects &amp;&amp;
 Version change iff PREV&#40;this&#41;.contains&#40;key, oldElement&#41;&#41;
 </PRE><br><br></dd></dl></dd></dl></td></tr>
                <tr><td id="docfooter">
                         :: page rendered by CandyDoc. Generated by <a href="http://code.google.com/p/dil">dil</a> on Sun Jun  8 17:12:54 2008.
                </td></tr>
        </table>
</div>
<script></script>
</body></html>